<%@ page language="java" import="java.util.*" pageEncoding="GB18030"
	import="Reservation.UserBean, DomainData.Reservation, Application.Dao.ReservationDAO, DomainData.MainCourse,Application.Dao.MainCourseDAO"%>


<div id="orderPage">


			
<div id="menubook">
<div class="menupage">
	<span style="background-image:url('images/back.jpg'); height:732px; display:block;"></span>
</div>

<%
	ArrayList<MainCourse> mlist2 = MainCourseDAO.getMainCourseList();
	for(int i=0; i<mlist2.size(); i+=2){
		MainCourse m1, m2;
		m1 = mlist2.get(i);
		m2 = (i+1)<mlist2.size() ? mlist2.get(i+1) : null;
%>
<div class="menupage">
<ul>
<li class="menuitem">
	<div class="up">
		<span class="menuicon" data-id="<%=m1.getID()%>" style="background-image: url('images/<%=m1.getID()%>.jpg');">&nbsp;</span>
		<div style="overflow:hidden;">
			<h3 style="float:left; margin-right:10px; font"><%=m1.getCourseName()%></h3>
			<span class="price">
				<sup style="">$</sup>
				<%=m1.getCoursePrice()%>
			</span>
		</div>
		<p class="intro">
			<%=m1.getCourseDescription()%>
		</p>
		<div class="orderopt" style="padding-left:10px; float:left; color:#555555;">
			<input type="radio" name="group1" value="spicy"><em>less spicy</em><br>
			<input type="radio" name="group1" value="salty"><em>less salty</em><br>
			<input type="radio" name="group1" value="oil"><em>less oil</em>
		</div>
		<div style="margin:15px 5px 5px 5px;">
			<a class="orderbtn"><span>Order It!<span></a>
		</div>
	</div>
	<div class="low">
		<ul>
			<li style="margin-bottom:2px; padding:1px; display:inline-block;">
				<a style="float:left;">
					<img style="width:50px;height:50px;" src="user.jpg" />
				</a>
				<div style="word-wrap:break-word;">
					<div>
						<span style="color: #3366CC; font-weight:bold; font-size:13px;">
							Jiayu Zhang
						<span>
						<span style="color: #999999;font-size:13px; font-weight:normal;">
							&nbsp;-&nbsp; Dec 10, 2011 &nbsp;-&nbsp;
						</span>
					</div>
					<div style="word-wrap:break-word; color:#444444;">
						I think it is fair enough. Given about the price as well as cuisine, recommand~
					</div>
				</div>
			</li>
			<li style="margin-bottom:2px; padding:1px; display:inline-block;">
				<a style="float:left;">
					<img style="width:50px;height:50px;" src="user.jpg" />
				</a>
				<div style="word-wrap:break-word;">
					<div>
						<span style="color: #3366CC; font-weight:bold; font-size:13px;">
							Jiayu Zhang
						<span>
						<span style="color: #999999;font-size:13px; font-weight:normal;">
							&nbsp;-&nbsp; Dec 10, 2011 &nbsp;-&nbsp;
						</span>
					</div>
					<div style="word-wrap:break-word; color:#444444;">
						I think it is fair enough. Given about the price as well as cuisine, recommand~
					</div>
				</div>
			</li>
			<li style="margin-bottom:2px; padding:1px; display:inline-block;">
				<a style="float:left;">
					<img style="width:50px;height:50px;" src="user.jpg" />
				</a>
				<div style="word-wrap:break-word;">
					<div>
						<span style="color: #3366CC; font-weight:bold; font-size:13px;">
							Jiayu Zhang
						<span>
						<span style="color: #999999;font-size:13px; font-weight:normal;">
							&nbsp;-&nbsp; Dec 10, 2011 &nbsp;-&nbsp;
						</span>
					</div>
					<div style="word-wrap:break-word; color:#444444;">
						I think it is fair enough. Given about the price as well as cuisine, recommand~
					</div>
				</div>
			</li>
		</ul>
		<div style="float:right; padding:0px 5px 3px 0px;"><a href="#">more</a></div>
	</div>
</li>

<%
	if(m2 != null){
%>
<li class="menuitem">
	<div class="up">
		<span class="menuicon" data-id="<%=m2.getID()%>" style="background-image: url('images/<%=m2.getID()%>.jpg');">&nbsp;</span>
		<div style="overflow:hidden;">
			<h3 style="float:left; margin-right:10px; font"><%=m2.getCourseName()%></h3>
			<span class="price">
				<sup style="">$</sup>
				<%=m2.getCoursePrice()%>
			</span>
		</div>
		<p class="intro">
			<%=m2.getCourseDescription()%>
		</p>
		<div class="orderopt" style="padding-left:10px; float:left; color:#555555;">
			<input type="radio" name="group1" value="spicy"><em>less spicy</em><br>
			<input type="radio" name="group1" value="salty"><em>less salty</em><br>
			<input type="radio" name="group1" value="oil"><em>less oil</em>
		</div>
		<div style="margin:15px 5px 5px 5px;">
			<a class="orderbtn"><span>Order It!<span></a>
		</div>
	</div>
	<div class="low">
		<ul>
			<li style="margin-bottom:2px; padding:1px; display:inline-block;">
				<a style="float:left;">
					<img style="width:50px;height:50px;" src="user.jpg" />
				</a>
				<div style="word-wrap:break-word;">
					<div>
						<span style="color: #3366CC; font-weight:bold; font-size:13px;">
							Jiayu Zhang
						<span>
						<span style="color: #999999;font-size:13px; font-weight:normal;">
							&nbsp;-&nbsp; Dec 10, 2011 &nbsp;-&nbsp;
						</span>
					</div>
					<div style="word-wrap:break-word; color:#444444;">
						I think it is fair enough. Given about the price as well as cuisine, recommand~
					</div>
				</div>
			</li>
			<li style="margin-bottom:2px; padding:1px; display:inline-block;">
				<a style="float:left;">
					<img style="width:50px;height:50px;" src="user.jpg" />
				</a>
				<div style="word-wrap:break-word;">
					<div>
						<span style="color: #3366CC; font-weight:bold; font-size:13px;">
							Jiayu Zhang
						<span>
						<span style="color: #999999;font-size:13px; font-weight:normal;">
							&nbsp;-&nbsp; Dec 10, 2011 &nbsp;-&nbsp;
						</span>
					</div>
					<div style="word-wrap:break-word; color:#444444;">
						I think it is fair enough. Given about the price as well as cuisine, recommand~
					</div>
				</div>
			</li>
			<li style="margin-bottom:2px; padding:1px; display:inline-block;">
				<a style="float:left;">
					<img style="width:50px;height:50px;" src="user.jpg" />
				</a>
				<div style="word-wrap:break-word;">
					<div>
						<span style="color: #3366CC; font-weight:bold; font-size:13px;">
							Jiayu Zhang
						<span>
						<span style="color: #999999;font-size:13px; font-weight:normal;">
							&nbsp;-&nbsp; Dec 10, 2011 &nbsp;-&nbsp;
						</span>
					</div>
					<div style="word-wrap:break-word; color:#444444;">
						I think it is fair enough. Given about the price as well as cuisine, recommand~
					</div>
				</div>
			</li>
		</ul>
		<div style="float:right; padding:0px 5px 3px 0px;"><a href="#">more</a></div>
	</div>
</li>
<%
	}
%>
</ul>
</div>

<%
	}
%>

<div class="menupage">
	<span style="background-image:url('images/front.jpg'); height:732px; display:block;"></span>
</div>
</div>

	<span class="nav" data-dir="left"  style="cursor:pointer; position:absolute;top:800px;left:45px;font-weight:bold;">&lt;---</span>
	<span class="nav" data-dir="right" style="cursor:pointer; position:absolute;top:800px;left:840px;font-weight:bold;">---&gt;</span>
</div>
		
		
		<div id="orderDisplay" style = "display:none;">
				<p style="cursor:pointer; display:none;">Place Your Order?</p>
				<ul id="orderlist">
				</ul>
		</div>


			
<div id="reservationList_forOrder" style = "display: none;">
					<form id="checkreservation_list">
		<table width= "800" position = "relative">
		<tr bgcolor="#F2F2F2">
			<td>Reservation ID</td>
			<td>From</td>
			<td>To</td>
			<td>Number Of People</td>
			<td>Table ID</td>
		</tr>
		<%
			List<Reservation> aList = ReservationDAO.getAvailable(userID);
			for (int i = 0; i < aList.size(); i++) {
				Reservation r = aList.get(i);
				int rID = r.getReservationID();
				out.println("<tr><td>"
						+ "<a href='#'>"+r.getReservationID()
						+ "</a></td><td>"
						+ r.getFrom().toString()
						+ "</td><td>"
						+ r.getTo().toString()
						+ "</td><td>"
						+ r.getNumberOfPeople()
						+ "</td><td>"
						+ r.getTableID()
						+"</td></tr>");
			}
			%>
				</table>
				</form>
</div>